/*
 * Copyright (C) 2012-2013  Romain DUBOIS
 * 
 * This file is part of NeMoS - Network and Modular Software
 * 
 * NeMoS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * NeMoS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with NeMoS.  If not, see <http://www.gnu.org/licenses/>.
 */
package nemos.remote.rsa.message;

import java.util.Set;

/**
 * IConnection : The connection interface.
 * 
 * <p>
 * A service registered with this interface represents an active connection to a
 * potentially remote server. It provides methods to know the other frameworks
 * connected to the same server and to stop the connection.
 * </p>
 * 
 * @author Romain DUBOIS
 */
public interface IConnection {

    /**
     * Get the connected server ID.
     * 
     * @return The connected server ID
     */
    String getId();

    /**
     * Get UUIDs of all connected frameworks.
     * 
     * @return The UUIDs of all connected frameworks
     */
    Set<String> getConnectedFrameworks();

    /**
     * Stop the connection to the server. A call to this method will provoke the
     * service to unregister.
     */
    void stop();
}
